package com.jy.admin.db.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.jy.admin.db.dao.SmsTemplateDao;
import com.jy.admin.db.entity.SmsTemplateEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* User: anonymous
* Date: 2021-12-10
* Time: 14:58:47.154
*/

@Repository
public class SmsTemplateDaoImpl extends AbstractBaseMapper<SmsTemplateEntity> implements SmsTemplateDao {

    @Override
    public SmsTemplateEntity getByTemplateNo(String templateCode) {
        Map<String, Object> params = new HashMap<>();
        params.put("templateNo", templateCode);
        return getSqlSession().selectOne(this.getStatement("getByTemplateNo"), params);
    }

    @Override
    public List<SmsTemplateEntity> getAllTemplates() {
        return getSqlSession().selectList(this.getStatement("getAllTemplates"));
    }
}